from .base import ApiException


class UnKnowServerError(ApiException):
    msg = 'sorry, we made a mistake!'
    error_code = 999


class ParameterException(ApiException):
    msg = 'invalid parameter'
    error_code = 1000


class NotFound(ApiException):
    msg = 'the resource are not found'
    error_code = 1001


class AuthorizationFailed(ApiException):
    # 鉴权失败
    msg = '抱歉，您暂无权限'
    error_code = 1002


class IdentificationFailed(ApiException):
    # 认证失败
    msg = '抱歉，您还未登录'
    error_code = 1003


class CsrfException(ApiException):
    msg = 'Illegal Request, Suspected CSRF Attack'
    error_code = 1004


class NotFoundException(ApiException):
    msg = 'Resource Not Found'
    error_code = 1005


class TooManyRequestException(ApiException):
    msg = 'Too Many Request'
    error_code = 1006


class ExpireException(ApiException):
    msg = 'Expire'
    error_code = 1007


class UnKnownUserException(ApiException):
    msg = '未知用户'
    error_code = 1008